package com.zhuhanpeng.cloud.file.repository;

import com.zhuhanpeng.cloud.file.entity.PtFileInfoEntity;
import com.zhuhanpeng.cloud.file.entity.SearchEntity;
import com.zhuhanpeng.cloud.mybatis.entity.PtFileEntity;
import com.zhuhanpeng.cloud.mybatis.entity.PtSendShareEntity;
import com.zhuhanpeng.cloud.mybatis.flexigrid.PagingEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FileDao {

    Integer getFileInfototal(@Param("entity") PtFileInfoEntity entity);

    List<PtFileInfoEntity> queryFileInfoByPage(@Param("entity") PtFileInfoEntity entity, @Param("paging") PagingEntity paging);

    void insertFileInfo(@Param("fileInfo") PtFileEntity fileInfo);


    Integer countFileInfo(@Param("entity") SearchEntity entity);

    List<PtFileEntity> queryAllFileInfoList(@Param("entity") SearchEntity entity);

    void deleteFile(@Param("fileEntity") PtFileEntity fileEntity);

    void collectionFileInfo(@Param("fileEntity") PtFileEntity fileEntity);

    List<PtFileEntity> queryCollectionInfo(@Param("entity") SearchEntity entity);

    Integer countCollectionFileInfo(@Param("entity") SearchEntity entity);

    void removeCollectionFileInfo(@Param("fileEntity") PtFileEntity fileEntity);

    List<PtFileEntity> queryRecycleFileInfo(@Param("entity") SearchEntity entity);

    Integer countRecycleFileInfo(@Param("entity") SearchEntity entity);

    void refreshFileInfo(@Param("entity") PtFileEntity entity);

    void deleteRecycleFileInfo(@Param("entity") PtFileEntity fileEntity);

    void shareFilesInfo(@Param("entity") PtSendShareEntity entity);

    List<PtSendShareEntity> queryShareFileInfoList(@Param("entity") SearchEntity entity);

    Integer countShareFileInfo(@Param("entity") SearchEntity entity);

    void deleteShareFileInfo(@Param("entity") PtSendShareEntity entity);

    PtFileEntity getFileInfo(@Param("entity") PtSendShareEntity entity);
}
